package com.paranoidmonkey.ode.Joint;

import com.paranoidmonkey.ode.AndrODE;
import com.paranoidmonkey.ode.World;

public class AMotor extends Joint {
	public AMotor(World world,JointGroup group){
		handle=AndrODE.dJointCreateAMotor (world.getHandle(), group.groupID);
	}
	public void setNumAxes(int num){
		AndrODE.dJointSetAMotorNumAxes (handle, num);
	}
	public void setAxis(int anum, int rel, float x, float y, float z){
		AndrODE.dJointSetAMotorAxis (handle, anum, rel,	x, y, z);
	}
	public void setAngle(int anum, float angle){
		AndrODE.dJointSetAMotorAngle (handle, anum, angle);
	}
	public void setParam(int parameter, float value){
		AndrODE.dJointSetAMotorParam (handle, parameter, value);
	}
	public void setMode(int mode){
		AndrODE.dJointSetAMotorMode (handle, mode);
	}
	public void addTorques(float torque1, float torque2, float torque3){
		AndrODE.dJointAddAMotorTorques (handle, torque1, torque2, torque3);
	}
	public int getNumAxes(){
		return AndrODE.dJointGetAMotorNumAxes (handle);
	}
	public void getAxis(int anum,float[] result){
		AndrODE.dJointGetAMotorAxis (handle, anum, result);
	}
	public int getAxisRel(int anum){
		return AndrODE.dJointGetAMotorAxisRel (handle, anum);
	}
	public float getAngle(int anum){
		return AndrODE.dJointGetAMotorAngle (handle, anum);
	}
	public float getAngleRate(int anum){
		return AndrODE.dJointGetAMotorAngleRate (handle, anum);
	}
	public float getParam(int parameter){
		return AndrODE.dJointGetAMotorParam (handle, parameter);
	}
	public int getMode(){
		return AndrODE.dJointGetAMotorMode (handle);
	}

}
